<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>下订单</title>
		<link type="text/css" rel="stylesheet" href="${path }/css/common.css">
		
		<link href="/css/wbox/wbox.css" rel="stylesheet" type="text/css" />
		<style type="text/css">
			body{
				font:12px/1.75 Tahoma,Arial;color:#333;
			}
		</style>
		<script type="text/javascript" src="${path }/js/jquery-1.4.2.min.js"></script>
		<script type="text/javascript" src="${path }/js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript">
			var path="${path}";
		</script>
		<script type="text/javascript" src="${path }/js/form/jquery.form.js"></script>
		<script src="/js/wbox.js" type="text/javascript"></script>
		<script type="text/javascript">
			function changeShippingFee(shippingBasePrice){
				$("#shippingFee").val(shippingBasePrice)
			}
		</script>
	</head>
	<body>
		<form action="/goods/order/save" method="post" id="saveForm">
			<div id="cart" style="width:700px;height:700px;">
				<p>购物车信息</p>
				<table class='Table' cellpadding='0' cellspacing='0' width='100%'>
					<tr>
						<td>
							商品编号
						</td>
						<td>
							商品名称
						</td>
						<td>
							商品价格
						</td>
						<td>
							商品数量
						</td>
					</tr>
					<c:forEach items="${cart}" var="cartGoods">
						<tr>
							<td>
								${cartGoods.goodsNo }
							</td>
							<td>
								${cartGoods.goodsName }
							</td>
							<td>
								${cartGoods.goodsPrice }
							</td>
							<td>
								${cartGoods.goodsAmount }
							</td>
							
						</tr>
					</c:forEach>
					<tr>
						<td colspan="5">
							商品总金额(不含运费):￥<input type="text" name="goodsAmount" value="${cartPrice }" size="20">元,
							配送费:<input type="text" id="shippingFee" name="shippingFee" readonly></input>
						</td>
					</tr>
				</table>
				
				<p>收货人信息</p>
				<table class='Table' cellpadding='0' cellspacing='0' width='100%'>
					<tr>
						<td width="30%">
							收货人姓名:
						</td>
						<td>
							<input type="text" name="consignee" size="30">
						</td>
					</tr>
					<tr>
						<td>
							收货人详细地址:
						</td>
						<td>
							<input type="text" name="address" size="30">
						</td>
					</tr>
					<tr>
						<td>
							收货人邮编:
						</td>
						<td>
							<input type="text" name="zipcode" size="30">
						</td>
					</tr>
					<tr>
						<td>
							收货人联系电话:
						</td>
						<td>
							<input type="text" name="tel" size="30">
						</td>
					</tr>
					<tr>
						<td>
							收货人手机号码:
						</td>
						<td>
							<input type="text" name="mobile" size="30">
						</td>
					</tr>
					<tr>
						<td>
							收货人邮箱地址:
						</td>
						<td>
							<input type="text" name="email" size="30">
						</td>
					</tr>
					<tr>
						<td>
							收货人最佳收货时间:
						</td>
						<td>
							<input type="text" name="bestTime" size="30">
						</td>
					</tr>
					<tr>
						<td>
							收货地址标志性建筑:
						</td>
						<td>
							<input type="text" name="signBuilding" size="30">
						</td>
					</tr>
					<tr>
						<td>
							说明:
						</td>
						<td>
							<textarea rows="4" cols="30" name="postscript"></textarea>
						</td>
					</tr>
				</table>
				
				<p>配送方式</p>
				<table class='Table' cellpadding='0' cellspacing='0' width='100%'>
					<c:forEach items="${shippingList}" var="shipping">
						<tr>
							<td>
								<input type="radio" name="shoperShippingId" value="${shipping.id }" onclick="changeShippingFee(${shipping.shippingBasePrice })"/>
								${shipping.shippingName }
							</td>
						</tr>
					</c:forEach>
				</table>
				
				<p>支付方式</p>
				<table class='Table' cellpadding='0' cellspacing='0' width='100%'>
					<c:forEach items="${paymentList}" var="payment">
						<tr>
							<td>
								<input type="radio" name="shoperPayId" value="${payment.id }"/>
								${payment.payName }
							</td>
						</tr>
					</c:forEach>
				</table>
				<br/>
				<table >
					<tr>
						<td>
							<input type="hidden" name="shoperName" value="${manager }">
							<input type="submit" value="去支付" />
							<a href="javascript:document.saveForm.submit();" ><img src="/images/submitOrder.jpg"/></a>
						</td>
					</tr>
				</table>
			</div>
		</form>
	</body>
</html>